import React from 'react'
import { Toast, NavBar } from 'react-vant';
import { useNavigate } from 'react-router-dom';


export default function Navbars(props:any) {
    let obj = useNavigate()

    let { title } = props

    return (
        <div>
            <NavBar
                title='标题'
                leftText="返回"
                rightText="按钮"
                onClickLeft={() => {
                    /* 返回上一页 */
                    obj(-1)
                }}
                onClickRight={() => Toast('按钮')}
            />
        </div>
    )
}
